# -*- coding: utf-8 -*-

__author__	= 'Souheil CHELFOUH <souheil@chelfouh.com>'
__docformat__	= 'plaintext'

from Products.Archetypes.public import registerType
from Products.PloneGossip.config import PROJECTNAME
from Products.PloneGossip.content import PGContainer
from Products.PloneGossip.schemas import threadSchema
from Products.PloneGossip.schemas import batchSchema


class PGThread( PGContainer ):
    """ A forum thread """

    # Configuration of my type
    portal_type = metal_type    = "PGThread"
    archetype_name              = "Thread"
    content_icon                = "thread_icon.gif"
    schema                      = PGContainer.schema.copy()     + \
                                  batchSchema                   + \
                                  threadSchema
    typeDescription             = "A simple plone gossip thread"
    typeDescMsgId               = "plonegossip_thread"
    global_allow                = False
    
    # Contents
    allowed_content_types       = ('PGPost',)

    # Views
    default_view                = 'thread_view'
    immediate_view              = 'thread_view'
    suppl_views                 = ()

    schema['description'].schemata = 'metadata'


registerType(PGThread, PROJECTNAME)
